"use strict";
var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var Person = /** @class */ (function () {
    function Person(name, age) {
        this.name = name;
        this.age = age;
    }
    Person.prototype.getInfo = function () {
        return this.name + "-" + this.age;
    };
    return Person;
}());
var p1 = new Person('lili', 18);
// console.log(p1.name)
console.log(p1.getInfo());
//继承
var Student = /** @class */ (function (_super) {
    __extends(Student, _super);
    function Student(name, age) {
        return _super.call(this, name, age) || this;
    }
    Student.prototype.skill = function () {
        // console.log(`${this.name}学习`)
    };
    return Student;
}(Person));
/**
 * private : 私有    只能类内部访问，在子类和实例上不能访问
 * protected:受保护  只能在类内部和子类中访问
 * public: 公共的    在类内部和子类、实例上都能访问到
 * */
var s1 = new Student('tom', 19);
s1.skill();
